package com.five.admin.server.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.five.admin.dto.BrandQueryDto;
import com.five.admin.mapper.BrandMapper;
import com.five.admin.server.BrandService;
import com.five.pojo.entity.Brand;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {

    @Resource
    private BrandMapper brandMapper;

    @Override
    public Page<Brand> findAll(Page<Brand> page, BrandQueryDto brandQueryDto) {
        Page<Brand> resultPage = getBaseMapper().findAll(page, brandQueryDto);
        return resultPage;
    }

    @Override
    public List<Long> fingIdsByBrandName(String brandName) {
        return getBaseMapper().fingIdsByBrandName(brandName);
    }


}
